#include "TabBar.h"

TabBar::TabBar(QWidget *parent): QTabWidget(parent)
{
	imageTab = new ImageTab(this);
	addTab(imageTab, QIcon("../img/image_ic.png"), tr("Image"));

	soundTab = new SoundTab(new SoundObj(true), this);
	//soundTab -> actionsOnButtons();
	addTab(soundTab, QIcon("../img/sound_ic.png"), tr("Sound"));
}

void TabBar::repaint()
{
	setTabText(0,tr("Image"));
	setTabText(1,tr("Sound"));
	imageTab -> repaint();
	soundTab -> repaint();
}

void TabBar::paintImage(ImageObj **img)
{
	imageTab->paintImage(img);

}

SoundTab* TabBar::getSoundTab() { return this->soundTab;}

TabBar::~TabBar(){}

void TabBar::sendSound(QSound *sound)
{
	soundTab->setSound(sound);
}

void TabBar::sendSoundObj(SoundObj *so)
{
	soundTab->setSoundObj(so);
}
